package showtime.framework.engine.map.rpg
{
	
	/**
	 * <object name="TRANSFER_1" type="TRANSFER" gid="141" x="224" y="480" width="1024" height="1024">
	 <properties>
	 <property name="mapID" value="map002.tmx"/>
	 <property name="spawnpoint" value="5,5"/>
	 </properties>
	 </object>
	 *  
	 * @author Administrator
	 * 
	 */	
	public class ObjectHolder
	{
		public var name:String = null;
		
		public var type:String = null;
		
		public var width:int = 0;
		public var height:int = 0;
		
		public var x:int = 0;		
		public var y:int = 0;
		
		public var properties:Object = null;
		
		public function ObjectHolder()
		{
			
		}
		
		public static function generate(target:Object):ObjectHolder
		{
			var object:ObjectHolder = new ObjectHolder();
			object.type = target.type;
			object.name = target.id;
			object.properties = {};
			object.properties["animationConfigID"] = target.animationConfigID;
			object.properties["graphicID"] = target.graphicID;
			object.properties["solid"] = target.solid;
			object.properties["name"] = target.name;
			object.properties["direction"] = target.direction;
			object.properties["subType"] = target.subType;
			object.properties["visible"] = target.visible;
			
			return object;
		}
	}
}